package com.itheima.mapper;

import com.itheima.domain.Trip;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public interface NewTripMapper {
    //查询行程表中所有的数据
    @Select("SELECT tn.id,tn.from_address fromAddress,tn.to_address toAddress, tn.start_time startTime,u.username,u.idcard,u.gender FROM tb_trip_new tn LEFT JOIN tb_user u ON tn.id = u.id")
    public List<Trip> queryTripAll();

}
